#include "network.h"

#ifndef UGLY_HACK_FOR_THOSE_WHO_DONT_KNOW_HOWTO_INSTALL_SDL
#include <SDL/SDL.h>
#include <SDL/SDL_net.h>
#else
#include <SDL.h>
#include <SDL_net.h>
#endif

void net_init(void)
{
    if(SDLNet_Init() == -1)
    {
        log_printf(LOG_ERR, "Couldn't initialize SDL_Net: %s", SDLNet_GetError());
        exit(EXIT_FAILURE);
    }
    log_puts(LOG_DBG, "Done initializing network module.");
}

void net_exit(void)
{
    SDLNet_Quit();
    log_puts(LOG_DBG, "Done uninitializing network module.");
}
